package br.com.atomic.framework;

public abstract class Sprite {
	protected int x;
	protected int y;
	protected int width;
	protected int height;

	// boolean isVisible;

	public Sprite(int width, int height) {
		setWidthImpl(width);
		setHeightImpl(height);
	}

	public void setPosition(int x, int y) {
		this.x = x;
		this.y = y;
	}

	public int getX() {
		return x;
	}

	public int getY() {
		return y;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}

	public void setWidthImpl(int width) {
		if (width < 0) {
			throw new IllegalArgumentException();
		}
		this.width = width;
	}

	public void setHeightImpl(int height) {
		if (height < 0) {
			throw new IllegalArgumentException();
		}
		this.height = height;
	}

}
